/*
 * @Description: element-ui-css重写
 * @Author: HuiSir<https://gitee.com/huisir001>
 * @Date: 2022-01-18 17:27:44
 * @LastEditTime: 2025-09-29 09:18:03
 */

/**
 * 弹窗样式
 */
.el-dialog {
  padding: 0;
  border-radius: 3px;
  --el-dialog-margin-top: 8vh;

  .el-dialog__header {
    margin: 0;
    border-radius: 3px 3px 0 0;
    padding: 12px var(--el-dialog-padding-primary);
    line-height: 1;
    background: var(--color-sidebar-bg);
    .el-dialog__title {
      color: var(--color-sidebar-font);
      font-size: var(--el-font-size-medium);
    }
  }
  .el-dialog__headerbtn {
    top: 0;
    height: 48px;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    .el-dialog__close {
      color: var(--color-sidebar-font);
    }
  }
  .el-dialog__body {
    padding: var(--el-dialog-padding-primary);
    overflow-y: auto;
    &::-webkit-scrollbar-track-piece {
      background: transparent;
    }

    &::-webkit-scrollbar {
      width: 5px;
    }

    &::-webkit-scrollbar-thumb {
      background: #c8c8c878;
      border-radius: 10px;
    }
  }
  .el-dialog__footer {
    background: #ecf0f1;
    padding: 10px 20px 14px;
    border-radius: 0 0 3px 3px;
    text-align: var(--footer-align, right);
  }
  &.is-fullscreen {
    position: relative;
    border-radius: 0;
    .el-dialog__header {
      border-radius: 0;
      background: unset;
      .el-dialog__title {
        color: unset;
      }
    }
    .el-dialog__headerbtn {
      .el-dialog__close {
        color: unset;
      }
    }
    .el-dialog__body {
      height: calc(100vh - 130px);
      overflow-y: auto;
    }
    .el-dialog__footer {
      position: absolute;
      background: #fff;
      border-radius: 0;
      bottom: 0;
      width: 100%;
      padding: var(--el-dialog-padding-primary);
    }
  }
}

/* 表单样式 */
.edit-form.el-form--inline .el-form-item {
  vertical-align: middle !important;
  margin-bottom: 14px !important;
  margin-right: 20px !important;
}

/* 表单子项 */
.el-form-item {
  .el-tree {
    width: 100% !important;
  }
  .el-tree__empty-text {
    left: 0;
    top: 0;
    transform: unset;
  }
}

/* 按钮样式 */
.el-button {
  .el-icon {
    --color: inherit !important;
  }
}

.el-button.is-link:hover {
  color: var(--el-button-text-color) !important;
  opacity: 0.6;
}

.el-button.is-link:not(.is-disabled):active {
  color: var(--el-button-active-color) !important;
  --color: var(--el-button-active-color) !important;
}

/* loading样式 */
.el-loading-mask {
  z-index: 998;
}

/* 弹出框样式 */
.el-popconfirm__main {
  margin-bottom: 10px;
}

/* 输入框样式 */
.el-input__prefix,
.el-input__suffix,
.el-input__prefix-inner,
.el-input__suffix-inner {
  display: flex;
  align-items: center;
  justify-content: center;
}

.el-input .el-input__icon {
  line-height: 1 !important;
  height: unset !important;
}
.el-input .el-input__icon.el-input__validateIcon {
  display: none;
}

.el-select-dropdown__item {
  & > i.el-icon {
    line-height: 39px;
  }
  &.selected > * {
    color: var(--el-color-primary);
  }
}

/* 卡片样式 */
.el-card {
  --el-card-padding: 14px;
}

/* 提示层级高于一切 */
.el-message {
  z-index: 10000 !important;
}

.el-drawer__header {
  margin-bottom: 20px;
  font-weight: 600;
}

.el-upload--picture-card {
  color: var(--el-text-color-regular);
}

.el-upload-list__item-name .el-icon {
  color: inherit;
}
